﻿using System.Web.Script.Serialization;

namespace App_Code.Helpers
{
    /// <summary>
    /// Summary description for SerializationHelper
    /// </summary>
    public class SerializationHelper
    {

        #region Private fields
        private static readonly JavaScriptSerializer JSSerializer = new JavaScriptSerializer(); 
        #endregion


        #region Public methods
        public static string SerializeToJSON(object toSerialize)
        {
            return JSSerializer.Serialize(toSerialize);
        } 
        #endregion
	
    }
}